import httpInstance from "@/utils/http";

/**
 * 获取轮播列表
 * @returns 
 */
export function getBannerAPI(params = {}) {
    //1为首页，2为分类商品页 默认为1
    const {distributionSite = '1'} = params

    return httpInstance({
        url: '/home/banner',
        params: {
            distributionSite
        }
    })
}

/**
 * 获取新鲜好物
 * @returns 
 */
export function getNewAPI(){
    return httpInstance({
        url: '/home/new',
        method: 'get',
    })
}

/**
 * 获取人气推荐
 * @returns 
 */
export function getHotAPI(){
    return httpInstance({
        url: '/home/hot',
        method: 'get',
    })
}

export function getGoodsAPI(){
    return httpInstance({
        url: '/home/goods',
        method: 'get',
    })
}